<template>
  <el-form-item :prop="item.prop" :label="item.label">
    <el-input v-if="item.type === 'input'" v-bind="$attrs" />
    <el-select v-if="item.type === 'select'" v-bind="$attrs">
      <el-option 
        v-for="option in item.options" 
        :key="option.value" 
        v-bind="option"
      />
    </el-select>

  </el-form-item>
</template>

<script setup lang='ts'>
import { ref, reactive } from 'vue'
defineOptions({
  name: 'FormItem'
})
defineProps({
  item: {
    type: Object
  }
})
</script>